package exception.demo2;

import java.io.FileOutputStream;

public class AutoCloseableDemo {
    public static void main(String[] args) {
        System.out.println("程序开始");
        try(
                FileOutputStream fos=new FileOutputStream("fos.txt");
                ) {
            fos.write(1);
        }catch (Exception e){
            e.getStackTrace();
        }
        System.out.println("程序结束");
    }
}
